xen: Fix event-channel destruction.
Lots of churn to fix a couple of bugs:
1. If we tried to close an interdomain channel, and the remote domain
is being destroyed, we immediately return success. But the remote
domain will place our port in state 'unbound', not 'free'. Hence
the port is effectively leaked.
2. If two domains are being destroyed at the same time, and share an
interdomain channel, the second to attempt the close may
dereference an invalid domain pointer. Aiee!
Doing som ework to be able to destroy event-channel context much
earlier in domain death was the civilised thing to do.
Signed-off-by: Keir Fraser <keir@xensource.com>